package com.xyh.student.dao;

import com.xyh.student.entity.Teacher;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


@Mapper
public interface TeacherDao {

    //查询老师的所有信息
    List<Teacher> queryAllTeacher(@Param("start")int start, @Param("pageSize") int pageSize);

    //通过id查询老师信息
    List<Teacher> queryByid(Integer id);

    //通过name查询
    List<Teacher> queryUserByUserName(String name);

    //通过password查询
    List<Teacher> queryUserBypassword(String password);

    //新增老师
    int insertTeacher(Teacher teacher);

    //更新老师信息
    int updateTeacher(Teacher teacher);

    //通过id删除老师
    int deleteTeacherByid(Integer id);

    //批量删除
    int deletes(int[] ids);

    //统计老师数量
    int numberOfTeachers();

}
